package com.jevons.geo_lib.op_history;


import com.mapbox.geojson.Point;


/**
 * Copyright 2020 JxGIS
 *
 * @file QiegeHistory
 * @auth linaisheng
 * Created on 2020/12/2.
 * Description：
 */
public class WakongHistory implements OperationHistory {

    public enum Type {
        AddPoint,
        MovePoint,
        InsertPoint
    }

    protected String featureId;
    protected Type type;

    private int pointIndex;
    private Point oldPoint;
    private Point newPoint;

    public WakongHistory(Type type, String featureId, int pointIndex, Point newPoint) {
        this.type = type;
        this.featureId = featureId;
        this.pointIndex = pointIndex;
        this.newPoint = newPoint;
    }

    @Override
    public String getOperateFlag() {
        return "op_wakong_drawLine";
    }

    @Override
    public DrawType getDrawType() {
        return DrawType.Wakong;
    }

    public String getFeatureId() {
        return featureId;
    }

    public Type getType() {
        return type;
    }

    public int getPointIndex() {
        return pointIndex;
    }

    public void setOldPoint(Point oldPoint) {
        this.oldPoint = oldPoint;
    }

    public Point getOldPoint() {
        return oldPoint;
    }

    public void setNewPoint(Point newPoint) {
        this.newPoint = newPoint;
    }

    public Point getNewPoint() {
        return newPoint;
    }
}
